home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
SETUP
/
US
/
CBUILDER
/
DATA.Z
/
CHARTFX.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-02-13
|
31KB
|
872 lines
unit ChartFX;
{ Conversion log:
Property TChartFX.Type renamed to Type_: Identifier is a reserved word
Array property TChartFX.Const renamed to Const_: Identifier is a reserved word }
interface
uses Ole2, OleCtl, Classes, Graphics, OleCtrls;
const
{ PointTypeConstants }
CHART_NONEMK = 0;
CHART_RECTMK = 1;
CHART_CIRCLEMK = 2;
CHART_TRIANGLEMK = 3;
CHART_MARBLEMK = 4;
CHART_CUBEMK = 5;
CHART_MANYMK = 6;
{ SchemeConstants }
CHART_CSSOLID = 0;
CHART_CSBWPATTERN = 1;
CHART_CSPATTERN = 2;
{ StackedConstants }
CHART_NOSTACKED = 0;
CHART_STACKED = 1;
CHART_STACKED100 = 2;
{ GridConstants }
CHART_NOGRID = 0;
CHART_HORZGRID = 1;
CHART_VERTGRID = 2;
CHART_BOTHGRID = 3;
CHART_GRIDY2 = 4;
{ GalleryConstants }
LINES = 1;
BAR = 2;
SPLINE = 3;
MARK = 4;
PIE = 5;
AREA = 6;
PARETO = 7;
SCATTER = 8;
HILOW = 9;
{ ConstTypeConstants }
CC_HIDETEXT = 1;
CC_HIDE = 2;
{ LegendStyleConstants }
CL_NOTCLIPPED = 1;
CL_NOTCHANGECOLOR = 2;
CL_HIDE = 4;
CL_HIDEXLEG = 4;
CL_FORCESERLEG = 8;
CL_GETLEGEND = 16;
CL_HIDEYLEG = 32;
{ OpenDataConstants }
COD_VALUES = 1;
COD_CONSTANTS = 2;
COD_COLORS = 3;
COD_STRIPES = 4;
COD_INIVALUES = 5;
COD_XVALUES = 6;
COD_STATUSITEMS = 7;
COD_UNKNOWN = -1;
COD_UNCHANGE = 0;
{ ClickConstants }
CHART_BALLOONCLK = 0;
CHART_DIALOGCLK = 1;
CHART_NONECLK = 2;
CHART_MENUCLK = 3;
{ DialogConstants }
CDIALOG_EXPORTFILE = 14;
CDIALOG_IMPORTFILE = 15;
CDIALOG_WRITETEMPLATE = 8;
CDIALOG_READTEMPLATE = 9;
CDIALOG_PAGESETUP = 4;
CDIALOG_ABOUT = 11;
CDIALOG_OPTIONS = 12;
CDIALOG_EDITTITLES = 35;
CDIALOG_FONTS = 39;
CDIALOG_ROTATE = 52;
{ AdmConstants }
CSA_MIN = 0;
CSA_MAX = 1;
CSA_GAP = 2;
CSA_SCALE = 3;
CSA_YLEGGAP = 4;
CSA_PIXXVALUE = 5;
CSA_XMIN = 6;
CSA_XMAX = 7;
CSA_XGAP = 8;
CSA_LOGBASE = 9;
{ TitleConstants }
CHART_LEFTTIT = 0;
CHART_RIGHTTIT = 1;
CHART_TOPTIT = 2;
CHART_BOTTOMTIT = 3;
{ FontConstants }
CHART_LEFTFT = 0;
CHART_RIGHTFT = 1;
CHART_TOPFT = 2;
CHART_BOTTOMFT = 3;
CHART_XLEGFT = 4;
CHART_YLEGFT = 5;
CHART_FIXEDFT = 6;
CHART_LEGENDFT = 7;
{ ItemConstants }
CI_HORZGRID = 0;
CI_VERTGRID = 1;
{ DecimalConstants }
CD_ALL = 0;
CD_VALUES = 1;
CD_YLEG = 2;
CD_XLEG = 3;
type
TChartFXLButtonDblClk = procedure(Sender: TObject; var X, Y, nSerie, nPoint, nRes: Smallint) of object;
TChartFXRButtonDown = procedure(Sender: TObject; var X, Y, nSerie, nPoint, nRes: Smallint) of object;
TChartFXChangeValue = procedure(Sender: TObject; var dValue: Double; var nSerie, nPoint, nRes: Smallint) of object;
TChartFXChangeString = procedure(Sender: TObject; var nType, nIndex, nRes: Smallint) of object;
TChartFXChangeColor = procedure(Sender: TObject; var nType, nIndex, nRes: Smallint) of object;
TChartFXChangePalette = procedure(Sender: TObject; var nIndex, nRes: Smallint) of object;
TChartFXChangeFont = procedure(Sender: TObject; var nIndex, nRes: Smallint) of object;
TChartFXChangePattern = procedure(Sender: TObject; var nType, nIndex, nRes: Smallint) of object;
TChartFXChangePattPal = procedure(Sender: TObject; var nIndex, nRes: Smallint) of object;
TChartFXMenu = procedure(Sender: TObject; var wParam, nSerie, nPoint, nRes: Smallint) of object;
TChartFXChangeType = procedure(Sender: TObject; var nType, nRes: Smallint) of object;
TChartFXUserScroll = procedure(Sender: TObject; wScrollMsg, wScrollParam: Integer; var nRes: Smallint) of object;
TChartFXGetLegend = procedure(Sender: TObject; nType: Smallint; var nRes: Smallint) of object;
TChartFX = class(TOleControl)
private
FOnLButtonDblClk: TChartFXLButtonDblClk;
FOnRButtonDown: TChartFXRButtonDown;
FOnChangeValue: TChartFXChangeValue;
FOnChangeString: TChartFXChangeString;
FOnChangeColor: TChartFXChangeColor;
FOnDestroy: TNotifyEvent;
FOnReadFile: TNotifyEvent;
FOnChangePalette: TChartFXChangePalette;
FOnChangeFont: TChartFXChangeFont;
FOnReadTemplate: TNotifyEvent;
FOnChangePattern: TChartFXChangePattern;
FOnChangePattPal: TChartFXChangePattPal;
FOnMenu: TChartFXMenu;
FOnChangeType: TChartFXChangeType;
FOnUserScroll: TChartFXUserScroll;
FOnGetLegend: TChartFXGetLegend;
function Get_Value(index: Smallint): Double; stdcall;
procedure Set_Value(index: Smallint; Value: Double); stdcall;
function Get_XValue(index: Smallint): Double; stdcall;
procedure Set_XValue(index: Smallint; Value: Double); stdcall;
function Get_IniValue(index: Smallint): Double; stdcall;
procedure Set_IniValue(index: Smallint; Value: Double); stdcall;
function Get_Const_(index: Smallint): Double; stdcall;
procedure Set_Const_(index: Smallint; Value: Double); stdcall;
function Get_Color(index: Smallint): TColor; stdcall;
procedure Set_Color(index: Smallint; Value: TColor); stdcall;
function Get_BkColor(index: Smallint): TColor; stdcall;
procedure Set_BkColor(index: Smallint; Value: TColor); stdcall;
function Get_Adm(index: Smallint): Double; stdcall;
procedure Set_Adm(index: Smallint; Value: Double); stdcall;
function Get_Pattern(index: Smallint): Smallint; stdcall;
procedure Set_Pattern(index: Smallint; Value: Smallint); stdcall;
function Get_Fonts(index: Smallint): Integer; stdcall;
procedure Set_Fonts(index: Smallint; Value: Integer); stdcall;
function Get_Title(index: Smallint): string; stdcall;
procedure Set_Title(index: Smallint; const Value: string); stdcall;
function Get_Legend(index: Smallint): string; stdcall;
procedure Set_Legend(index: Smallint; const Value: string); stdcall;
function Get_SerLeg(index: Smallint): string; stdcall;
procedure Set_SerLeg(index: Smallint; const Value: string); stdcall;
function Get_KeyLeg(index: Smallint): string; stdcall;
procedure Set_KeyLeg(index: Smallint; const Value: string); stdcall;
function Get_FixLeg(index: Smallint): string; stdcall;
procedure Set_FixLeg(index: Smallint; const Value: string); stdcall;
function Get_YLeg(index: Smallint): string; stdcall;
procedure Set_YLeg(index: Smallint; const Value: string); stdcall;
function Get_KeySer(index: Smallint): string; stdcall;
procedure Set_KeySer(index: Smallint; const Value: string); stdcall;
function Get_StatusText(index: Smallint): string; stdcall;
procedure Set_StatusText(index: Smallint; const Value: string); stdcall;
function Get_RGBFont(index: Smallint): TColor; stdcall;
procedure Set_RGBFont(index: Smallint; Value: TColor); stdcall;
function Get_HFont(index: Smallint): Smallint; stdcall;
procedure Set_HFont(index: Smallint; Value: Smallint); stdcall;
function Get_ItemWidth(index: Smallint): Smallint; stdcall;
procedure Set_ItemWidth(index: Smallint; Value: Smallint); stdcall;
function Get_ItemStyle(index: Smallint): Smallint; stdcall;
procedure Set_ItemStyle(index: Smallint; Value: Smallint); stdcall;
function Get_ItemColor(index: Smallint): TColor; stdcall;
procedure Set_ItemColor(index: Smallint; Value: TColor); stdcall;
function Get_DecimalsNum(index: Smallint): Smallint; stdcall;
procedure Set_DecimalsNum(index: Smallint; Value: Smallint); stdcall;
protected
procedure InitControlData; override;
public
function OpenDataEx(nType: Smallint; n1, n2: Integer): Integer; stdcall;
function CloseData(nType: Smallint): TOleBool; stdcall;
function DblClk(nType: Smallint; lExtra: Integer): Integer; stdcall;
function RigClk(nType: Smallint; lExtra: Integer): Integer; stdcall;
function Status(nItems: Smallint; lpStatus: Integer): Integer; stdcall;
function ShowDialog(nDialog: Smallint; lExtra: Integer): Integer; stdcall;
function PrintIt: Integer; stdcall;
function Scroll(wParam, lParam: Integer): Integer; stdcall;
function SetStatusItem(index: Smallint; bText: TOleBool; nID: Smallint;